package db.Dao;

import java.util.List;

import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;

import db.mappers.IUserMappers;
import db.model.User;

/**
 * @author DGW-PC
 * @date   2017年9月7日
 * crud
 */
@Repository
public class UserDao extends SqlSessionTemplate implements IUserMappers{

	
	public UserDao(SqlSessionFactory sqlSessionFactory) {
		super(sqlSessionFactory);
	}

	@Override
	public List<User> selectAll() {
		IUserMappers userMappers = this.getMapper(IUserMappers.class);
		List<User> list = userMappers.selectAll();
		return list;
	}
}
